AddSubscription
Content
Description
This callback action is triggered when a new subscription is created by MarketONE. This will be invoked by MarketONE to notify the partner when the user purchases a subscription from the service provider website, or a re-provision request is triggered by the customer or a CSR.
Note: It is expected that the digital partner performs any applicable provisioning if the callback is configured via the developer portal (see the Callbacks topic for more information), and returns the mandatory fields described here.
Request
action
|
String(maxSize: 36) |
Mandatory |
The action parameter is set to "AddSubscription". |
endDate
|
Timestamp(format: ISO 8601) |
Optional |
The endDate parameter is the end date of the service. |
productCode
|
String(maxSize: 15) |
Mandatory |
The productCode parameter is the code of the partner product purchased by the user as defined by the partner in MarketONE for which there is an agreement in place with a CSP. |
registrationString
|
String(maxSize: 256) |
Mandatory |
The registrationString parameter contains information that can be used by the partner to associate this subscription with a user. This can be an email address, an MSISDN, or a registration code. |
startDate
|
Timestamp(format: ISO 8601) |
Optional |
The startDate parameter is the start date of the subscription. |
subscriptionId
|
String(maxSize: 50) |
Mandatory |
The subscriptionId parameter is the internal id of a MarketONE subscription. |
Response
Status: 200 - OK
|
partnerSubscriptionId
|
String(maxSize: 36) |
Mandatory |
The partnerSubscriptionId parameter is the partner specific id that can be used for subsequent PUT or DELETE commands. |
registrationStatus
|
String(maxSize: 50) |
Mandatory |
The registrationStatus parameter is the status of the partner service user registration (ACTIVE, INACTIVE). It is usually INACTIVE at the time of provisioning. If the partner already finds a match with the information provided in the registration string, it can return ACTIVE. |
subscriptionId
|
String(maxSize: 50) |
Mandatory |
The subscriptionId parameter is the internal id of a MarketONE subscription. |
Status: 4xx
|
code
|
String(maxSize: 50) |
Optional |
The code is the error for the status. |
message
|
String(maxSize: 256) |
Optional |
The message is the error description. |
|
Status: 400 - Bad request
|
invalid-request
|
Invalid request. |
parameter-not-supported
|
Not supported. |
|
Status: 401 - Authorization failure
|
authorization-failure
|
Not authorized. |
|
Status: 403 - Permissions denied
|
Status: 5xx
|
code |
String(maxSize: 50) |
Optional |
The code is the error for the service |
message |
String(mazSize: 256) |
Optional |
The message is the error description. |
|
Status: 500 - Internal server error
|
system-error
|
System error. |
|
Example
Request
POST https://acme.company.com/m1-subscription-events:443 HTTP/1.1
Content-Type: application/json
{
"action": "AddSubscription",
"subscriptionId": "9876543",
"productCode": "837346",
"startDate": "2019-05-27T05:52:02",
"registrationString": "+14255558987"
}
Response
HTTP/1.1 200 OK
{
"partnerSubscriptionId": "123456789",
"subscriptionId": "9876543",
"registrationStatus": "INACTIVE"
}
Note: See the MarketONE Developer Portal for an OpenAPI instance of the MarketONE APIs.
Revision History
20.01.01
|
Added this topic.
|
20.01.02
|
Added the Status: 5xx and the Status: 500 - Internal server error sections to the Response table.
|
|
Updated the Status: 200 - OK section parameter descriptions in the Response table.
|